package cn.calin.day05.demo26;

import java.util.Objects;

public class Demo03Objects {
    public static void main(String[] args) {
        String s1="abc";
        String s2=null;
        /*boolean b=s2.equals(s1);//NullPointerException null是不可调用方法的会抛出空指针
        System.out.println(b);*/

        boolean b2= Objects.equals(s1,s2);
        System.out.println(b2);

    }

}
